const express = require('express');
const router = express.Router();
const userService = require('../service/user/userService');

const adminManageService = require('../service/admin/adminManageService');
const {verifyToken, verifyAdminToken} = require('../middleware/auth')

/**
 * 用户入口API
 */
router.post('/login', userService.login)
router.post('/checkToken', userService.checkToken)
router.post('/get/by/id', verifyToken, userService.getUserInfoById)

/**
 * 管理员入口API
 */
router.post('/admin/login', adminManageService.login)
router.post('/admin/checkToken', verifyAdminToken, adminManageService.checkToken)
router.post('/admin/getUserInfo', verifyAdminToken, adminManageService.getUserInfo)

module.exports = router;
/**
 * 优化登录UI样式
 * 给每支球队的荣耀时刻和球队介绍增加编辑和保存入口
 */
